package com.zenithmind.library.pojo.query;

import com.zenithmind.common.query.BaseQuery;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 图书副本查询条件
 *
 * @author ZenithMind
 * @since 2024-06-14
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Schema(name = "图书副本查询条件", description = "图书副本查询的条件参数")
public class BookCopyQuery extends BaseQuery {

    @Schema(description = "图书ID", example = "1")
    private String bookId;

    @Schema(description = "图书标题", example = "Java编程思想")
    private String bookTitle;

    @Schema(description = "图书ISBN", example = "9787111213826")
    private String bookIsbn;

    @Schema(description = "条形码", example = "BC001")
    private String barcode;

    @Schema(description = "RFID标签", example = "RFID001")
    private String rfidTag;

    @Schema(description = "状态 (0-不可借阅, 1-可借阅, 2-已借出, 3-维修中, 4-丢失, 5-损坏)", example = "1")
    private Integer status;

    @Schema(description = "位置信息", example = "A区")
    private String location;

    @Schema(description = "书架号", example = "A-1-1")
    private String shelfNumber;

    @Schema(description = "层号", example = "1")
    private Integer floorNumber;

    @Schema(description = "区域", example = "A区")
    private String area;

    @Schema(description = "最小采购价格", example = "0.00")
    private BigDecimal minPurchasePrice;

    @Schema(description = "最大采购价格", example = "100.00")
    private BigDecimal maxPurchasePrice;

    @Schema(description = "采购开始日期", example = "2024-01-01")
    private LocalDate purchaseStartDate;

    @Schema(description = "采购结束日期", example = "2024-12-31")
    private LocalDate purchaseEndDate;

    @Schema(description = "供应商", example = "新华书店")
    private String supplier;

    @Schema(description = "关键词搜索", example = "编程")
    private String keyword;

    @Schema(description = "排序字段", example = "createTime")
    private String sortField;

    @Schema(description = "排序方向 (asc/desc)", example = "desc")
    private String sortOrder;
}
